home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 June: Reference Library / Dev.CD Jun 96 RL / Dev.CD Jun 96 RL.toast / Technical Documentation / develop / develop Issue 23 / develop Issue 23 code / ProjectDrag 1.1b8 / Sources / ProjectDrag Sources / Cancel.r < prev    next >
Encoding:
Text File  |  1995-07-24  |  5.5 KB  |  199 lines  |  [TEXT/MPS ]

  1. /* Cancel.r: Cancel applet resources for ProjectDrag.
  2.  *
  3.  * A set of applets for drag and drop source control by Tim Maroney.
  4.  * See develop, issue 23 for details.
  5.  *
  6.  * Built on DropShell by Leonard Rosenthol, Stephan Somogyi, and Marshall Clow,
  7.  * and using the MoreFiles utilities by Jim Luther.
  8.  *
  9.  * This software is free, but don't modify and redistribute it without
  10.  * changing the status window to indicate your name and your changes!
  11.  */
  12.  
  13. #define SystemSevenOrLater 1
  14. #include "Types.r"
  15. #include "SysTypes.r"
  16. #include "BalloonTypes.r"
  17. #include "AEUserTermTypes.r"
  18.  
  19. include "Cancel.rsrc";
  20.  
  21. /* First thing we need is the Finder Help Balloon */
  22. resource 'hfdr' (-5696) {
  23.     HelpMgrVersion, 0, 0, 0,
  24.     {
  25.         HMStringItem {
  26.             "Drag a checked-out or MRO file onto this icon, and Cancel will cancel "
  27.             "the checkout or MRO and discard your changes. You can also drag a folder."
  28.         },
  29.     }
  30. };
  31.  
  32.  
  33. /* Menus & Menu Help Resources Go Here */
  34. resource 'MENU' (128, "Apple") { 128, textMenuProc, 0x7FFFFFFD, enabled, apple, 
  35.     {    /* array: 2 elements */
  36.         /* [1] */    "About Cancel…", noIcon, noKey, noMark, plain,
  37.         /* [2] */    "-", noIcon, noKey, noMark, plain
  38.     }
  39. };
  40.  
  41. resource 'MENU' (129, "File") { 129, textMenuProc, allEnabled, enabled, "File", 
  42.     {    /* array: 2 elements */
  43.         /* [1] */    "Cancel Checkout or MRO…",    noIcon, "O", noMark, plain,
  44.         /* [2] */    "Quit",         noIcon, "Q", noMark, plain
  45.     }
  46. };
  47.  
  48. resource 'DITL' (128, purgeable) {
  49.     {    /* array DITLarray: 3 elements */
  50.         /* [1] */ {97, 198, 117, 270}, Button { enabled, "OK" }, 
  51.         /* [2] */ {8, 8, 87, 271}, StaticText { disabled,
  52.             "Cancel - ProjectDrag's applet for canceling checkouts and MROs. By Tim Maroney. " },
  53.         /* [3] */ {0, 0, 0, 0}, HelpItem { disabled, HMScanhdlg { 1 } } 
  54.     }
  55. };
  56.  
  57. /* Here are the STR#'s that the Help text is stored in! */
  58. resource 'STR#' (128,purgeable) {    /* help items for Apple Menu */
  59.     { /* array StringArray: 3 elements */
  60.         /* [1] */     "Information about that nightmare of reversion which is known to devils as Cancel.",
  61.         /* [2] */     "Click here to dismiss this dialog.",
  62.         /* [3] */     "This text describes the product, its author, and why!"
  63.     }
  64. };
  65.  
  66. resource 'STR#' (129,purgeable) {    /* help items for File Menu */
  67.     { /* array StringArray: ? elements */
  68.         /* [1] */    "Use this menu to cancel checkout or MRO of a file and to exit Cancel.",
  69.         /* [2] */     "Use this menu to cancel checkout or MRO of a file and to exit Cancel. "
  70.                       "This menu is unavailable now.",
  71.         /* [3] */     "Use this menu to cancel checkout or MRO of a file and to exit Cancel. "
  72.                     "This menu is unavailable until you respond to the alert box or dialog box.",
  73.         /* [4] */     "This command is unavailable until you respond to the alert box or dialog box.",
  74.         /* [5] */     "Use this command to cancel checkout or MRO of a file.",
  75.         /* [6] */     "Use this command to cancel checkout or MRO of a file. "
  76.                     "Not available now for some strange reason.",
  77.         /* [7] */     "Use this command to exit Cancel.",
  78.         /* [8] */     "Use this command to exit Cancel. "
  79.                     "Not available now for some strange reason."
  80.     }
  81. };
  82.  
  83. resource 'STR#' (200, purgeable) {    /* help info for the Error Dialog */
  84.     {    /* array StringArray: 3 elements */
  85.         /* [1] */    "Click here to dismiss this dialog.",
  86.         /* [2] */    "This text describes the error that occured.",
  87.         /* [3] */    "This error ID gives more specific details of the error."
  88.     }
  89. };
  90.  
  91. resource 'STR#' (2001, purgeable) {    /* progress info */
  92.     {    /* array StringArray: 1 element */
  93.         /* [1] */    "canceling “<1>”",
  94.         /* [2] */    "inspecting “<1>”"
  95.     }
  96. };
  97.  
  98. resource 'hmnu' (129, purgeable) {    /* File */
  99.     HelpMgrVersion, 0, 0, 0,
  100.     HMSkipItem {    /* no missing items */    },
  101.     {    /* array HMenuArray: 4 elements */
  102.         HMStringResItem {    /* Menu Title */
  103.             129, 1,
  104.             129, 2,
  105.             129, 3,
  106.             129, 4
  107.         },
  108.         HMStringResItem {    /* Open File… */
  109.             129, 5,
  110.             129, 6,
  111.             0, 0,
  112.             0, 0
  113.         },
  114.         HMStringResItem {    /* Quit */
  115.             129, 7,
  116.             129, 8,
  117.             0, 0,
  118.             0, 0
  119.         },
  120.     }
  121. };
  122.  
  123. resource 'BNDL' (128, "Bundle") {
  124.     'pdca',
  125.     0,
  126.     {    /* array TypeArray: 2 elements */
  127.         /* [1] */
  128.         'FREF',
  129.         {    /* array IDArray: 2 elements */
  130.             /* [1] */ 0, 128,
  131.             /* [2] */ 1, 129,
  132.             /* [3] */ 2, 130
  133.         },
  134.         /* [2] */
  135.         'ICN#',
  136.         {    /* array IDArray: 2 elements */
  137.             /* [1] */ 0, 128,
  138.             /* [2] */ 1, 0,
  139.             /* [3] */ 2, 0
  140.         }
  141.     }
  142. };
  143.  
  144. data 'pdca' (0) {
  145.     ""
  146. };
  147.  
  148. resource 'FREF' (128) { 'APPL', 0, "" }; 
  149. resource 'FREF' (129) { 'fold', 1, "" }; 
  150. resource 'FREF' (130) { '****', 2, "" }; 
  151.  
  152.  
  153. /*
  154.     This is the KEY resource in supporting AEVTs - it is used by scripting/macro
  155.     systems such as Control Tower & QuicKeys in determing what events an application
  156.     supports.
  157.     
  158.     In this one, we simply tell it we support the required events, since that is all
  159.     we do.  If you add additional events, you MUST consult the AETE documentation
  160.     distributed by Apple.  Make sure you find the RELEASE NOTES, since this resource
  161.     has undergone a NUMBER of chanes.
  162. */
  163. resource 'aete' (0, "Apple Events Terminology") {
  164.  
  165.     0x00,            /* major version number in BCD */
  166.     0x90,            /* minor version number in BCD. From 7/9/91 version of AEUT docs */
  167.     english,        /* descriptions are in english */
  168.     roman,            /* use roman language script system */
  169.     
  170.     {    /* array Suites: 1 elements */
  171.     
  172.         /*******************************************************
  173.         [1] -- The part that show we do the required AppleEvents
  174.         *******************************************************/
  175.  
  176.         "Required Suite",
  177.         "Events that every application should support",
  178.         'reqd',
  179.         1,            /* suite level */
  180.         1,            /* suite version */
  181.         
  182.         {
  183.             /* array Events: 0 elements */
  184.         },
  185.         
  186.         {
  187.             /* array Classes: 0 elements */
  188.         },
  189.         
  190.         {
  191.             /* array ComparisonOps: 0 elements */
  192.         },
  193.         
  194.         {
  195.             /* array Enumerations: 0 elements */
  196.         },
  197.     }
  198. };
  199.